package com.dunka.demo.mapper;

import com.dunka.demo.pojo.Menu;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author Dunka
 * @Description 菜单接口
 * @Date 12:19   2019/7/25
 * @ClassName MenuMapper
 */
@Repository
public interface MenuMapper {
    /***
    * @Description: 获取所有菜单项
    * @Param:
    * @return: java.util.List<com.dunka.demo.pojo.Menu>
    * @Author: Dunka
    * @Date: 2019/7/25 14:22
    */
    public List<Menu> getAllMenu();

    /***
    * @Description: 修改菜单项
    * @Param: [menu]
    * @return: boolean
    * @Author: Dunka
    * @Date: 2019/7/25 14:23
    */
    public boolean updateMenu(Menu menu);

    /***
    * @Description: 根据菜单id删除菜单项
    * @Param: [id]
    * @return: boolean
    * @Author: Dunka
    * @Date: 2019/7/25 14:23
    */
    public boolean deleteMenu(int id);

    /***
    * @Description:新增菜单项
    * @Param: [menu]
    * @return: boolean
    * @Author: Dunka
    * @Date: 2019/7/25 14:25
    */
    public boolean addMenu(Menu menu);

    /***
    * @Description:根据id返回菜单项
    * @Param: [id]
    * @return: com.dunka.demo.pojo.Menu
    * @Author: Dunka
    * @Date: 2019/7/25 14:26
    */
    public Menu getMenuById(int id);
}
